<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box1{
            width: 200px;
            height: 200px;
            background-color: red;
        }

        #box2{
            width: 200px;
            height: 200px;
            background-color: green;
        }
    </style>
</head>
<body>
    <div id="box1"></div>
    <div id="box2"></div>


    <script>
        box1.addEventListener("touchstart",(e)=>{
            console.log("touchstart","box1");
        })

        box1.addEventListener("touchmove",(e)=>{
            console.log("touchmove","box1");
        })

        box1.addEventListener("touchend",(e)=>{
            console.log("touchend","box1");
        })


        box1.addEventListener("mousedown",(e)=>{
            // 鼠标在元素上摁下
            console.log("touchstart","box1");
        })

        box1.addEventListener("mousemove",(e)=>{
            console.log("touchmove","box1");
        })

        box1.addEventListener("mouseup",(e)=>{
            console.log("touchend","box1");
        })

    </script>
</body>
</html>